---
title: clsAffiliatedPolicy
summary: API reference for clsAffiliatedPolicy.
status: draft
owner: SAIF Corporation
last_reviewed: 2026-08-21
library: SAIF.Business.View.Policy
reference_type: embedded
---

# clsAffiliatedPolicy

`clsAffiliatedPolicy` is the legacy affiliated-policy row model retained for compatibility with the older affiliate view of policy relationships. Each instance represents one entry returned from `pk72846_view_policy.getpolicyaffiliatelist`, formats that row for display, and can lazily hydrate full `clsPolicyData` for the affiliated policy while propagating the parent's preferred association type. The source analysis marks this model obsolete in favor of the current `Associations` property.

## Purpose
- Represent one affiliated-policy entry from the legacy affiliate list still exposed beside the newer associations model.
- Provide display-ready identifiers, status text, and agent/agency metadata for one affiliated policy row.
- Lazily retrieve full `clsPolicyData` for the affiliated policy when a caller navigates from the legacy list into the full policy view.*

## Context
- Namespace: `SAIF.Business.View.Policy`
- Assembly/package: `SAIF.Business.View.Policy` (embedded)

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `AgencySeqNum` | `Public ReadOnly Property AgencySeqNum() As Decimal` | Returns the agency sequence number carried on the affiliated-policy row when available. |
| `AgentNum` | `Public ReadOnly Property AgentNum() As Decimal` | Returns the agent number carried on the affiliated-policy row when available. |
| `FormattedPolicyDescr` | `Public ReadOnly Property FormattedPolicyDescr() As String` | Combines the stored policy-number/name descriptor with formatted status text for display. |
| `PolicyKey` | `Public ReadOnly Property PolicyKey() As String` | Returns the key string used by collection lookup and equality. |
| `PolicyNum` | `Public ReadOnly Property PolicyNum() As Decimal` | Returns the affiliated policy number. |
| `PolicyName` | `Public ReadOnly Property PolicyName() As String` | Returns the affiliated policy's name. |
| `PolicyStatus` | `Public ReadOnly Property PolicyStatus() As PolicyStatusEnums.Statuses` | Returns the normalized policy status derived from the row's status code. |
| `Policy` | `Public ReadOnly Property Policy() As clsPolicyData` | Lazily retrieves the full policy aggregate for this affiliated policy and applies the parent collection's preferred association type to it.* |
| `Equals` | `Public Overloads Shared Function Equals(ByVal objA As Object, ByVal objB As Object) As Boolean` | Compares two boxed affiliated-policy objects using their policy key. |
| `Equals` | `Public Overloads Overrides Function Equals(ByVal inObject As Object) As Boolean` | Applies the policy-key equality rule to an arbitrary object. |
| `Equals` | `Public Overloads Function Equals(ByVal inObject As clsAffiliatedPolicy) As Boolean` | Treats two affiliated-policy rows as equal when they share the same policy key. |
| `ToString` | `Public Overrides Function ToString() As String` | Returns the policy key as the object's compact string form. |

## Behavioral notes
- The `Fill` routine reads `policy_num_and_name`, `policy_key`, `policy_num`, `policy_name`, and `policy_status_code`, then attempts to read `agent_num` and `agency_seq_num`; if those two columns are absent it falls back to zero for both values.*
- The `Policy` property calls `clsPolicyData.GetPolicyData` only once per instance and then reuses the cached object on later reads.
- The legacy affiliate path coexists with the newer association model, and analysis explicitly notes that callers should prefer `Associations` over this obsolete representation when modern relationship detail is needed.

## Constraints and usage notes
- Analysis identifies this type as obsolete in favor of `clsPolicyData.Associations`; keep that direction visible when documenting or consuming the API.
- Inherited members are intentionally omitted because `clsBusinessBase` is external.
- This type is materialized by `clsAffiliatedPolicyCollection`; it does not expose its own retrieve factory.

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts. Statements
> marked with ** could not be confirmed; treat as unknown until verified.

## Sources
- `SAIF.Business.View.Policy/clsAffiliatedPolicy.vb`
- `SAIF.Business.View.Policy/clsPolicyData.vb`
